Embodiments of this disclosure relate to document object model (DOM) trees and cascading style sheets (CSSs) and, more particularly, to techniques for detecting an influence that is caused by changing the source code of an application from which a DOM tree and CSS may be extracted.
A screen, e.g., web page, displayed by a web application may be changed by changing the source code of the web application (for example, by correcting a bug or by changing the specification). Thus, when the source code of a web application is changed, whether regression or degradation has occurred should be checked. Normally, for this checking, a tester performs a visual regression test, while operating the web browser, for all associated screens of the web application every time the source code is changed.
However, manually performing every regression test is extremely costly. Accordingly, normally, the regression test is performed only for the portions of the screens assumed to be influenced by a change in the source code of the web application. However, with such regression tests, regression or degradation often occurs due to a failure in finding all the portions of the web pages that may be influenced.
Also, for example, when a common JavaScript® framework (for example, Dojo Toolkit, jQuery, or prototype.js) that may influence the entire web application is changed, the regression test has to be performed for all screens. However, if a web page is hierarchized by using the JavaScript framework mentioned above and is dynamically created, investigation of the range of influence on the web page caused by changing the source code is extremely difficult. Also, since the regression test on a web application is a work of repeating a similar operation over and over again, this is an extremely boring work for the tester.
Accordingly, pieces of software for automating the regression test on a web application are being provided. For example, these pieces of software are Selenium, which is open source software, and IBM® Rational® Functional Tester (see Kazunari Hohshoh, et al., “Effective System Development Practice Using Tools—Aiming at Smarter System Development,” IBM Japan, Provision Spring No. 69, 2011), SmartBear TestComplete, and HP® QuickTest Professional, which are commercial products. All of Selenium, IBM Rational Functional Tester, SmartBear TestComplete, and HP QuickTest Professional adopt a white list method for performing a regression test while clearly indicating the comparison portion.
With Selenium, the regression test may be almost entirely automatically performed by creating a test case for a web application. Also, because Selenium enables the regression test to be easily performed on a plurality of web browsers, the efficiency of the regression test on web applications may be increased.
Japanese Patent Publication No. JP2009-140155A describes a test program for an application program. This test program causes a computer on which an application program is installed to function as a recording control means for cumulatively recording, in a recording device, user events and screen events generated by the application program at a time of execution of a test case on the application program; an execution means for reading the user events and the screen events cumulatively recorded in the recording device, and sequentially executing the user events by the application program that is a test target; and an error output control means for comparing a screen event generated from execution of one user event by the application program that is a test target to execution of a next user event and a screen event generated from execution of the one user event read out from the recording device to execution of the next user event, and for outputting the screen events that do not coincide as an error.
Furthermore, Japanese Patent Publication No. JP2009-140155A describes that the screen event cumulatively recorded in the recording device by the recording control means is a difference of screen change, and is information to be acquired by DOM, and that the screen event cumulatively recorded in the recording device by the recording control means is information indicated by a changed portion expressed by Xpath and a DOM subtree.
Japanese Patent Publication No. JP2013-54693A describes a regression test support program. The regression test support program causes a computer to perform a method of detecting an update of display contents of one of one or more browser screens displayed on a display; recording in a first storage unit, every time the update is detected, data including information indicating the display contents of all of the browser screens displayed and identification information of the browser screen related to the update; referring to the first storage unit according to an edit instruction for the data; and displaying a list of images indicating the display contents of the browser screen associated with the identification information.